import RPi.GPIO as GP
import time
GP.setmode(GP.BOARD)
GP.setup((11,12),GP.OUT)
pwmr=GP.PWM(12,50)
pwmr.start(100)
for j in range(5): 
    for i in range(1,20):
        #time.sleep(1)
        pwmr.ChangeDutyCycle(i*1.5)
        time.sleep(0.1)
    for i in range(20,1,-1):
        pwmr.ChangeDutyCycle(i*1.5)
        time.sleep(0.1)
pwmr.stop()
GP.cleanup()